3.3 \(\int x (a+b \sin (c+d x^2)) \, dx\)

Optimal. Leaf size=25 \[ \frac{a x^2}{2}-\frac{b \cos \left (c+d x^2\right )}{2 d} \]

[Out]

(a*x^2)/2 - (b*Cos[c + d*x^2])/(2*d)

________________________________________________________________________________________

Rubi [A]  time = 0.0212534, antiderivative size = 25, normalized size of antiderivative = 1., number of steps used = 4, number of rules used = 3, integrand size = 14, \(\frac{\text{number of rules}}{\text{integrand size}}\) = 0.214, Rules used = {14, 3379, 2638} \[ \frac{a x^2}{2}-\frac{b \cos \left (c+d x^2\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Int[x*(a + b*Sin[c + d*x^2]),x]

[Out]

(a*x^2)/2 - (b*Cos[c + d*x^2])/(2*d)

Rule 14

Int[(u_)*((c_.)*(x_))^(m_.), x_Symbol] :> Int[ExpandIntegrand[(c*x)^m*u, x], x] /; FreeQ[{c, m}, x] && SumQ[u]
 &&  !LinearQ[u, x] &&  !MatchQ[u, (a_) + (b_.)*(v_) /; FreeQ[{a, b}, x] && InverseFunctionQ[v]]

Rule 3379

Int[(x_)^(m_.)*((a_.) + (b_.)*Sin[(c_.) + (d_.)*(x_)^(n_)])^(p_.), x_Symbol] :> Dist[1/n, Subst[Int[x^(Simplif
y[(m + 1)/n] - 1)*(a + b*Sin[c + d*x])^p, x], x, x^n], x] /; FreeQ[{a, b, c, d, m, n, p}, x] && IntegerQ[Simpl
ify[(m + 1)/n]] && (EqQ[p, 1] || EqQ[m, n - 1] || (IntegerQ[p] && GtQ[Simplify[(m + 1)/n], 0]))

Rule 2638

Int[sin[(c_.) + (d_.)*(x_)], x_Symbol] :> -Simp[Cos[c + d*x]/d, x] /; FreeQ[{c, d}, x]

Rubi steps

\begin{align*} \int x \left (a+b \sin \left (c+d x^2\right )\right ) \, dx &=\int \left (a x+b x \sin \left (c+d x^2\right )\right ) \, dx\\ &=\frac{a x^2}{2}+b \int x \sin \left (c+d x^2\right ) \, dx\\ &=\frac{a x^2}{2}+\frac{1}{2} b \operatorname{Subst}\left (\int \sin (c+d x) \, dx,x,x^2\right )\\ &=\frac{a x^2}{2}-\frac{b \cos \left (c+d x^2\right )}{2 d}\\ \end{align*}

Mathematica [A]  time = 0.0135029, size = 41, normalized size = 1.64 \[ \frac{a x^2}{2}+\frac{b \sin (c) \sin \left (d x^2\right )}{2 d}-\frac{b \cos (c) \cos \left (d x^2\right )}{2 d} \]

Antiderivative was successfully verified.

[In]

Integrate[x*(a + b*Sin[c + d*x^2]),x]

[Out]

(a*x^2)/2 - (b*Cos[c]*Cos[d*x^2])/(2*d) + (b*Sin[c]*Sin[d*x^2])/(2*d)

________________________________________________________________________________________

Maple [A]  time = 0.005, size = 27, normalized size = 1.1 \begin{align*}{\frac{a \left ( d{x}^{2}+c \right ) -b\cos \left ( d{x}^{2}+c \right ) }{2\,d}} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

int(x*(a+b*sin(d*x^2+c)),x)

[Out]

1/2/d*(a*(d*x^2+c)-b*cos(d*x^2+c))

________________________________________________________________________________________

Maxima [A]  time = 0.961183, size = 28, normalized size = 1.12 \begin{align*} \frac{1}{2} \, a x^{2} - \frac{b \cos \left (d x^{2} + c\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sin(d*x^2+c)),x, algorithm="maxima")

[Out]

1/2*a*x^2 - 1/2*b*cos(d*x^2 + c)/d

________________________________________________________________________________________

Fricas [A]  time = 1.8349, size = 49, normalized size = 1.96 \begin{align*} \frac{a d x^{2} - b \cos \left (d x^{2} + c\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sin(d*x^2+c)),x, algorithm="fricas")

[Out]

1/2*(a*d*x^2 - b*cos(d*x^2 + c))/d

________________________________________________________________________________________

Sympy [A]  time = 0.23124, size = 31, normalized size = 1.24 \begin{align*} \begin{cases} \frac{a x^{2}}{2} - \frac{b \cos{\left (c + d x^{2} \right )}}{2 d} & \text{for}\: d \neq 0 \\\frac{x^{2} \left (a + b \sin{\left (c \right )}\right )}{2} & \text{otherwise} \end{cases} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sin(d*x**2+c)),x)

[Out]

Piecewise((a*x**2/2 - b*cos(c + d*x**2)/(2*d), Ne(d, 0)), (x**2*(a + b*sin(c))/2, True))

________________________________________________________________________________________

Giac [A]  time = 1.14744, size = 35, normalized size = 1.4 \begin{align*} \frac{{\left (d x^{2} + c\right )} a - b \cos \left (d x^{2} + c\right )}{2 \, d} \end{align*}

Verification of antiderivative is not currently implemented for this CAS.

[In]

integrate(x*(a+b*sin(d*x^2+c)),x, algorithm="giac")

[Out]

1/2*((d*x^2 + c)*a - b*cos(d*x^2 + c))/d